<template>
   <div class="header">
       <span class="span" :style="data.background"> 
                   <img class="logo" src="../../img/logo@3x.png" alt="">
                   <span class="biaoti">{{data.biaoti}}</span>
                   <span class="yuer">余额</span>
                   <span class="qianshu">{{data.qianshu}}</span>
                   <div class="headerchongzhi" v-if="chongzhi==true" @click=chongzhi1()>充值</div>
      </span> 
   </div>
</template>
<script>
export default {
  data() {
    return {
      is: false,
      background:
        "background-image: linear-gradient(-94deg, #884acc 0%, #c273cf 100%);"
    };
  },

  mounted() {
    console.log(this.url)
  },
  methods: {
    chongzhi1: function() {
      this.$router.push({ name:this.url});
    }
  },
  props: ["data", "chongzhi",'url'],
  watch: {}
};
</script>
<style scoped lang="scss">
span {
  display: inline-block;
}
.span {
  width: 660px;
  height: 360px;
  margin-right: 20px;
  position: relative;
  background-image: linear-gradient(-94deg, #884acc 0%, #c273cf 100%);
  border-radius: 8px;
  box-shadow: 0 2px 4px 0 rgba(40, 8, 92, 0.4);
  border-radius: 10px;
  .logo {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 72px;
    height: 72px;
  }
  .biaoti {
    position: absolute;
    top: 30px;
    left: 1.5rem;
    font-family: PingFangSC-Medium;
    font-size: 40px;
    color: #ffffff;
  }
  .yuer {
    font-family: PingFangSC-Regular;
    font-size: 36px;
    color: #ffffff;
    position: absolute;
    bottom: 30px;
    left: 30px;
  }
  .qianshu {
    font-family: SFUIText-Medium;
    font-size: 60px;
    color: #ffffff;
    position: absolute;
    bottom: 30px;
    left: 1.7rem;
  }
  .headerchongzhi {
    background: rgba(0, 0, 0, 0.2);
    border: 0 solid #ebebeb;
    border-radius: 4px;
    width: 74 * 2px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    position: absolute;
    bottom: 34px;
    right: 40px;
    font-family: PingFangSC-Regular;
    font-size: 32px;
    color: #ffffff;
  }
}
</style>